<template>
	<view class="resource_view">
		<view class="resource_view_top">
			<image src="http://klwl-file.oss-cn-shenzhen.aliyuncs.com/202203/yiqipin/55863664968560.png"
				class="resource_view_img"></image>
			<view class="resource_view_top_item">
				<view class="resource_view_top_item_box">
					<view class="user_info">
						<view class="user_info_left">
							<image :src="formatPictureImg(dataForm.logo)" class="user_img u-m-r-30"></image>
							<view class="user_info_box">
								<view class="user_info_name">{{dataForm.contacts}}</view>
								<view class="user_info_name_label">{{dataForm.industry}}</view>
							</view>
						</view>
						<view class="user_info_right" @click="show = true">联系Ta</view>
					</view>
				</view>
			</view>
		</view>

		<view class="resource_view_company">
			<view class="resource_view_company_name">所属运营中心</view>
			<view class="resource_view_company_info">
				<!-- <image :src="formatPictureImg(dataForm.logo)" class="resource_view_company_info_img"></image> -->
				<view class="u-m-l-20">
					<view class="resource_view_company_info_name line-1">{{dataForm.operation_center}}</view>
					<view class="resource_view_company_info_area">{{item.address}}</view>
				</view>
			</view>
		</view>

		<view class="company_info">
			<view class="company_info_title">公司相关</view>
			<view class="company_info_mh_box" v-if="vuex_user.type!=2">
				<view class="company_info_mh_box_one">非会员用户无法查看联系方式</view>
				<view class="company_info_mh_box_two" @click="onHy">{{vuex_user.type==3?'申请会员中':'成为会员'}}</view>
			</view>
			<view :class="{'filter':vuex_user.type!=2}" class="company_info_mh">

				<view class="company_info_item">
					<view class="company_info_c">公司名</view>
					<view class="company_info_n">{{dataForm.name || '暂无'}}</view>
				</view>
				<view class="company_info_item">
					<view class="company_info_c">办公地址</view>
					<view class="company_info_n">{{dataForm.address || '暂无'}}</view>
				</view>
				<view class="company_info_item">
					<view class="company_info_c">年营业额</view>
					<view class="company_info_n">{{dataForm.turnover || '暂无'}}</view>
				</view>
				<view class="company_info_item">
					<view class="company_info_c">职位</view>
					<view class="company_info_n">{{dataForm.position || '暂无'}}</view>
				</view>
				<view class="company_info_item">
					<view class="company_info_c">简介</view>
					<view class="company_info_n">{{dataForm.introduction || '暂无'}}</view>
				</view>
				<view class="company_info_item">
					<view class="company_info_c">主营业务</view>
					<view class="company_info_n">{{dataForm.industry || '暂无'}}</view>
				</view>
			</view>
		</view>

		<view class="resources">
			<view class="resources_title">Ta能提供的资源</view>
			<view class="resources_content">
				<view class="resources_content_item">{{dataForm.provide || '暂无'}}</view>

			</view>
		</view>

		<view class="resources u-m-t-50">
			<view class="resources_title">Ta需要的资源</view>
			<view class="resources_content">
				<view class="resources_content_item">{{dataForm.need || '暂无'}}</view>

			</view>
		</view>


		<view class="personal_info">
			<view class="personal_info_title">个人信息</view>
			<view class="personal_info_item">
				<view class="personal_info_c">目标</view>
				<view class="personal_info_n">{{dataForm.target || '暂无'}}</view>
			</view>
			<view class="personal_info_item">
				<view class="personal_info_c">技能</view>
				<view class="personal_info_n">{{dataForm.skill || '暂无'}}</view>
			</view>
			<view class="personal_info_item">
				<view class="personal_info_c">兴趣</view>
				<view class="personal_info_n">{{dataForm.interest || '暂无'}}</view>
			</view>
			<view class="personal_info_item">
				<view class="personal_info_c">成就</view>
				<view class="personal_info_n">{{dataForm.achievement || '暂无'}}</view>
			</view>
		</view>
		<u-popup v-model="show" mode='center' :mask-close-able='false' contBg="transparent">
			<view class="popup-box">
				<view class="top">
					<image class="top-banner"
						src="http://klwl-file.oss-cn-shenzhen.aliyuncs.com/202203/yiqipin/53415526327171.png" mode="">
					</image>
					<image class="banner-icon"
						src="http://klwl-file.oss-cn-shenzhen.aliyuncs.com/202203/yiqipin/52706041873060.png" mode="">
					</image>
					<view class="top-user-info">
						<view class="info-name " style="display: inline-block;">{{dataForm.contacts}}</view>
						<view class="info-name u-p-t-14">{{dataForm.major}}</view>
					</view>
					<view class="infoBase">
						<view class="infoBase-con u-m-b-20">手机号：{{dataForm.phone}}</view>
						<!-- <view class="infoBase-con">微信号：12345678901</view> -->
					</view>
					<view class="mask" v-if="vuex_user.type!=2">非会员用户无法查看 联系方式</view>
					<view class="popuo-btn" @click="onGO(dataForm.phone)">
						{{vuex_user.type==2?'联系他/她':vuex_user.type==3?'申请会员中':'成为会员'}} </view>
				</view>
				<view @click="show = false" class="cha iconfont iconfont-e725"></view>
			</view>
		</u-popup>
		<sww-login />
	</view>
</template>

<script>
	export default {

		components: {

		},

		data() {
			return {
				show: false,
				dataForm: {}
			}
		},

		onLoad(options) {
			this.initPage(options.id)
		},
		methods: {
			initPage(pk_id) {
				this.$resPost('GetResourcesInfoDetailed', {
					pk_id
				}).then(res => {
					this.dataForm = res.data
				})
			},
			onHy() {

				if (this.vuex_user.type == 1) this.$to('/package/user/user-info/index?type=applyDist')
			},
			onGO(phone) {
				if (this.vuex_user.type == 2) {
					uni.makePhoneCall({
						phoneNumber:`${phone}`
					})
				}
				if (this.vuex_user.type == 1) this.$to('/package/user/user-info/index?type=applyDist')
			},
		}
	};
</script>

<style lang="scss" scoped>
	.resource_view {
		padding-bottom: env(safe-area-inset-bottom);

		.filter {
			filter: blur(3.5px);

		}

		.line-1 {
			overflow: hidden;
			word-break: break-all;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 1;
		}

		.personal_info {
			padding: 0 30rpx;
			margin-top: 60rpx;

			.personal_info_title {
				font-size: 34rpx;
				font-family: Source Han Sans CN;
				font-weight: bold;
				color: #000000;
				margin-bottom: 20rpx;
			}

			.personal_info_item {
				border-bottom: 1rpx solid #e5e5e5;
				padding-bottom: 40rpx;
				margin-bottom: 20rpx;

				.personal_info_c {
					font-size: 26rpx;
					color: #666666;
				}

				.personal_info_n {
					font-size: 30rpx;
					color: #C5C5C5;
					margin-top: 40rpx;
				}
			}

		}


		.resources {
			padding: 0 30rpx;
			margin-top: 20rpx;

			.resources_title {
				font-size: 34rpx;
				font-weight: bold;
				color: #000000;
				margin-bottom: 40rpx;

			}

			.resources_content_item {
				font-size: 26rpx;
				color: #686868;
				margin-bottom: 5rpx;

			}
		}

		.company_info {
			padding: 0 30rpx;
			position: relative;

			.company_info_mh {
				position: relative;
			}

			.company_info_mh_box {
				position: absolute;
				width: 100%;
				height: 100%;
				left: 0;
				top: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				flex-direction: column;
				z-index: 30;
				opacity: .9;

				.company_info_mh_box_one {
					font-size: 44rpx;
					font-weight: bold;
					color: #6B5C4E;
				}

				.company_info_mh_box_two {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 260rpx;
					height: 80rpx;
					background: #6B5C4E;
					border-radius: 40rpx;
					font-size: 34rpx;
					color: #FFFFFF;
					margin-top: 135rpx;
				}
			}

			.company_info_title {
				font-size: 34rpx;
				font-family: Source Han Sans CN;
				font-weight: bold;
				color: #000000;
				margin-bottom: 20rpx;
			}

			.company_info_item {
				border-bottom: 1rpx solid #e5e5e5;
				padding-bottom: 20rpx;
				margin-bottom: 20rpx;

				.company_info_c {
					font-size: 28rpx;
					font-weight: bold;
					color: #000000
				}

				.company_info_n {
					font-size: 25rpx;
					color: #686868;
					margin-top: 10rpx;
				}
			}

		}





		.resource_view_top {
			position: relative;

			.resource_view_img {
				width: 100%;
				height: 305rpx;
			}

			.resource_view_top_item {
				padding: 40rpx 30rpx 30rpx 60rpx;
				position: absolute;
				left: 0;
				top: 0;
				width: 100%;
				height: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.user_img {
					width: 116rpx;
					height: 116rpx;
					border-radius: 58rpx;
				}

				.resource_view_top_item_box {
					display: flex;
					align-items: center;
					width: 100%;

					.user_info {
						width: 100%;
						display: flex;
						align-items: center;
						justify-content: space-between;

						.user_info_left {
							display: flex;
							align-items: center;
							color: #FFFFFF;

							.user_info_name {
								font-size: 40rpx;
								font-weight: bold;
							}

							.user_info_name_label {
								font-size: 22rpx;
							}


						}

						.user_info_right {
							display: flex;
							align-items: center;
							justify-content: center;
							width: 200rpx;
							height: 70rpx;
							background: #76685A;
							border-radius: 35rpx;
							font-size: 30rpx;
							color: #FFFFFF;
						}
					}



				}

				// .resource_view_bottom_item_box {
				// 	display: flex;
				// 	justify-content: space-between;
				// 	margin-top: 38rpx;

				// 	.resource_view_fraction {
				// 		width: 300rpx;
				// 		color: #ffffff;
				// 		font-size: 32rpx;
				// 		text-align: center;
				// 	}
				// }

			}
		}


		.resource_view_company {
			margin: 70rpx 0;
			padding: 0 30rpx;

			.resource_view_company_name {
				font-size: 34rpx;
				font-weight: bold;
				color: #000000;
				margin-bottom: 50rpx;
			}

			.resource_view_company_info {
				display: flex;

				.resource_view_company_info_img {
					width: 80rpx;
					height: 80rpx;
					border-radius: 50%;
				}

				.resource_view_company_info_name {
					width: 550rpx;
					font-size: 34rpx;
					color: #000000;
				}

				.resource_view_company_info_area {
					font-size: 26rpx;
					color: #686868;
				}
			}
		}

		.popup-box {
			width: 522rpx;

			.top {
				position: relative;

				.top-banner {
					width: 100%;
					height: 480rpx;
					position: relative;
				}

				.banner-icon {
					width: 270rpx;
					height: 154rpx;
					position: absolute;
					top: 0;
					left: 50%;
					transform: translateX(-50%);
				}

				.top-user-info {
					position: absolute;
					top: 18rpx;
					left: 32%;
					font-size: 24rpx;
					color: #F8DFBF;

					.info-name {
						border-bottom: 1px solid #F9DEBF;
					}
				}

				.infoBase {
					position: absolute;
					top: 190rpx;
					left: 80rpx;

					.infoBase-con {
						font-size: 36rpx;
						color: #686868;
						position: relative;
						width: 400rpx;

						&::before {
							content: '.';
							font-size: 36rpx;
							color: #686868;
							position: absolute;
							left: -30rpx;
							bottom: 10rpx;
						}
					}
				}

				.mask {
					width: 440rpx;
					height: 150rpx;
					background-color: rgba(255, 255, 255, 0.9);
					position: absolute;
					top: 174rpx;
					left: 40rpx;
					z-index: 10;
					font-size: 44rpx;
					color: #6B5C4E;
					font-weight: bold;
					display: flex;
					align-items: center;
					justify-content: center;
					text-align: center;
				}

				.popuo-btn {
					width: 260rpx;
					height: 80rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					background-color: #6B5C4E;
					border-radius: 40rpx;
					color: #fff;
					font-size: 34rpx;
					position: absolute;
					bottom: 42rpx;
					left: 50%;
					transform: translateX(-50%);
				}
			}


			.cha {
				color: #d6d3d3;
				font-size: 70rpx;
				margin-top: 50rpx;
			}
		}
	}
</style>
